package com.qqbot.core.support;

import com.qqbot.core.core.BotDispatcher;
import com.qqbot.core.core.BotFactory;
import com.qqbot.core.core.framework.BotInit;
import com.qqbot.core.core.framework.SnowFlakeIdGenerator;
import com.qqbot.core.handler.message.GroupMessageEventHandler;
import com.qqbot.core.handler.message.GroupRecallEventHandler;
import com.qqbot.core.handler.message.GroupUserAddEventHandler;
import com.qqbot.core.handler.message.PrivateMessageEventHandler;
import com.qqbot.core.handler.meta.HeartbeatEventHandler;
import com.qqbot.core.injector.support.*;
import com.qqbot.core.injector.support.friend.FriendInjector;
import com.qqbot.core.injector.support.friend.TempFriendInjector;
import com.qqbot.core.injector.support.group.GroupInjector;
import com.qqbot.core.injector.support.group.MemberInjector;
import com.qqbot.core.injector.support.group.RecallMessageInjector;
import com.qqbot.core.injector.support.group.UserAddMessageInjector;
import com.qqbot.core.scheduled.FlushCacheScheduled;
import org.springframework.context.annotation.ImportSelector;
import org.springframework.core.type.AnnotationMetadata;

/**
 * 机器人注册
 *
 * @author changwenpeng
 * @date 2022年5月9日
 */
public class BotApplicationRegistrar implements ImportSelector {

    @Override
    public String[] selectImports(AnnotationMetadata annotationMetadata) {
        return new String[]{BotFactory.class.getName(), BotDispatcher.class.getName(),
                SnowFlakeIdGenerator.class.getName(), HeartbeatEventHandler.class.getName(),
                PrivateMessageEventHandler.class.getName(), GroupMessageEventHandler.class.getName(),
                GroupRecallEventHandler.class.getName(), GroupUserAddEventHandler.class.getName(),
                RecallMessageInjector.class.getName(), UserAddMessageInjector.class.getName(), BotInit.class.getName(),
                MessageStringInjector.class.getName(), GroupInjector.class.getName(),
                MessageChainInjector.class.getName(), TempFriendInjector.class.getName(),
                MemberInjector.class.getName(), MessageIdInjector.class.getName(), MessageIdIntInjector.class.getName(),
                BotInjector.class.getName(), FlushCacheScheduled.class.getName(), FriendInjector.class.getName(),};
    }

}
